<template>
  <div id="app">
    <router-view/>
  </div>
</template>
<script>
export default {
  mounted() {
    var that = this
    var containHeight = document.documentElement.offsetHeight //整个文档高度
    var clientHeight = window.innerHeight  //视口高度
    var scrollY = window.scrollY

    //创建节点
    // var loadingnode = document.createElement('div');
    // loadingnode.append('加载中....')
    // loadingnode.setAttribute('class','loading')
    window.addEventListener('touchstart',e=>{
      console.log(containHeight,clientHeight,scrollY)

      // if(containHeight - clientHeight - scrollY >50 ){    
      //   console.log('ss')   
      //   document.getElementById('container').appendChild(loadingnode)
      // }
    })
    // window.addEventListener('touchend',e=>{
    //   if(scrollY+clientHeight<containHeight){
    //     document.getElementById('container').removeChild(loadingnode)
    //   }
    // })
  },
}
</script>
<style>
  *{margin:0;padding: 0;font-size: 12px;}
  ul li{ list-style: none; }
  a{ text-decoration: none; }
  /* 点击输入框清除默认样式 */
  input:focus{outline:none;}
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
  max-width:720px;
  min-width: 320px;
  margin: 0 auto;
}

</style>
